import 'package:flutter/material.dart';
import 'package:kq_flutter_tv_widgets/widgets/chart/kq_chart_model.dart';
import '../../resources/kq_theme_colors.dart';
import 'kq_chart_line_model.dart';

class KqChartBarModel {
  KqChartModel chartModel;

  ///折线数据集合
  List<List<ChartBarValue>> chartBarArry;

  ///是否增加线状图,默认为false
  bool isLine;

  ///折线数据集合
  List<List<ChartLineValue>>? chartLineArry;

  KqChartBarModel({
    required this.chartBarArry,
    required this.chartModel,
    this.chartLineArry,
    this.isLine = false,
  });
}

class ChartBarValue {
  String xValue;
  String yValue;

  ///文案样式
  TextStyle style;

  ///当点击或者滑动到该区域时是否显示文案，只针对isShowValue=fase且isShowClickValue或isShowSlideValue为True才会被使用
  bool isShow;

  ///坐标线颜色
  Color lineColor;

  ///是否显示内容点的分割线
  bool isCountDivider;

  ///内容分割线的颜色
  Color dividerColor;

  ///分割线是否为实现，默认为false
  bool dividerLineSolid;

  ///遮罩层颜色
  List<Color> shaderColors;

  ///以下为自动计算，无需传入
  double xPoint;
  double yPoint;
  ChartBarValue(
      {required this.xValue,
      required this.yValue,
      this.lineColor = KqThemeColors.bgBlue,
      this.style = const TextStyle(fontSize: 12, color: KqThemeColors.text666),
      this.isCountDivider = false,
      this.dividerLineSolid = false,
      this.dividerColor = KqThemeColors.bgBlue,
      this.isShow = false,
      this.shaderColors = const [
        KqThemeColors.bgBlue,
        KqThemeColors.bgWhite,
      ],
      this.xPoint = 0,
      this.yPoint = 0});
}
